import axios from '@/utils/request'

 import config from '@/common/config'

let base = config.getArcBasePath();

/**-------------------------与后端通讯接口------------------请写在下面-------------------------------------------- */
/**
 * 图片分类
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {pageNum:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'主键 主键',categoryName:'分类名称',branchId:'机构编号',pid:'上一级',isPub:'是否是公共分类的图片'}
 **/
 
//普通查询 条件之间and关系  
export const listImageCategory = params => { return axios.get(`${base}/mdp/arc/image/imageCategory/list`, { params: params }); };

//普通查询 条件之间and关系
export const queryImageCategoryById = params => { return axios.get(`${base}/mdp/arc/image/imageCategory/queryById`, { params: params }); };

//删除一条图片分类 params={id:'主键 主键'}
export const delImageCategory = params => { return axios.post(`${base}/mdp/arc/image/imageCategory/del`,params); };

//批量删除图片分类  params=[{id:'主键 主键'}]
export const batchAddImageCategory = params => { return axios.post(`${base}/mdp/arc/image/imageCategory/batchAdd`, params); };

//批量删除图片分类  params=[{id:'主键 主键'}]
export const batchDelImageCategory = params => { return axios.post(`${base}/mdp/arc/image/imageCategory/batchDel`, params); };

//修改一条图片分类记录
export const editImageCategory = params => { return axios.post(`${base}/mdp/arc/image/imageCategory/edit`, params); };

//新增一条图片分类
export const addImageCategory = params => { return axios.post(`${base}/mdp/arc/image/imageCategory/add`, params); };

//批量修改某些字段
export const editSomeFieldsImageCategory = params => { return axios.post(`${base}/mdp/arc/image/imageCategory/editSomeFields`, params); };